package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.common.entity.PageResult;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface SetmealMapper {
    void insert(Setmeal setmeal);


    Page<Setmeal> findPage(QueryPageBean queryPageBean);

    @Select("select * from t_setmeal where id = #{id}")
    Setmeal findById(Integer id);

    @Delete("delete from t_setmeal where id = #{id}")
    void delete(Integer id);

    List<Map<String, Object>> findSetmealCount();

    void setmealAndCheckGroup(Integer id, Integer checkgruopId);

    void edit(Setmeal setmeal);

    void updatesetmealAndCheckGroup(Integer setmealId, Integer checkgruopId);

    List<Setmeal> findAll();

    Setmeal findinfoById(Integer mealId);


    List<CheckGroup> findCheckGroupBysetmealId(Integer mealId);
}
